export const tableOption = {
  "border": true,
  "index": true,
  "indexLabel": "序号",
  "stripe": true,
  "menuAlign": "center",
  "align": "center",
  "searchMenuSpan": 24,
  addBtn: false,
  editBtn: false,
  delBtn: false,
  viewBtn:true,
  // menu: false,
  menuWidth: 80,
  labelWidth: 120,
  search: {
    labelWidth: 150,  // 设置 search 部分的 label 宽度
  },
  "column": [
    {
      type: "input",
      label: "工单号",
      prop: "docNo",
      span: 12,
   /*   formatter:(val) => {
        val.docNo = val.pathName.split('\\').pop();
        return val.pathName.split('\\').pop();
      },*/
      search: true,
    },
    {
      type: "select",
      label: "车间",
      prop: "workshopName",
      span: 12,
      overHidden: true,
      dicUrl: "/admin-api/o3-pfoc/workshop/getWorkshopList",
      dicMethod: "get",
      props: {
        label: "workshopName",
        value: "id"
      },
      search: true,
      searchLabelWidth: 100
    },
    {
      type: "select",
      label: "产线",
      prop: "productLineName",
      span: 12,
      overHidden: true,
      dicUrl: "/admin-api/o3-pfoc/realityproductlinemain/getLineList",
      dicMethod: "get",
      props: {
        label: "realityLineName",
        value: "id"
      },
      search: true
    },
    {
      type: "input",
      label: "品号",
      prop: "itemCode",
      span: 12,
      search: true,
    },
    {
      "type": "input",
      "label": "设备编号",
      "prop": "deviceSn",
      "span": 12,
      search: false,
    },
    {
      "type": "input",
      "label": "SN",
      "prop": "sn",
      "span": 12,
      width: 150,
      search: false
    },
	  {
      "type": "input",
      "label": "连接头编号",
      "prop": "no",
      "span": 12,
      width: 100,
    },
	  {
      "type": "input",
      "label": "插损_1310",
      "prop": "il1",
      "span": 12,
      width: 80,
    },
	  {
      "type": "input",
      "label": "插损_1550",
      "prop": "il2",
      "span": 12,
      width: 80,
    },
	  {
      "type": "input",
      "label": "回损_1310",
      "prop": "rl1",
      "span": 12,
      width: 80,
    },
	  {
      "type": "input",
      "label": "回损_1550",
      "prop": "rl2",
      "span": 12,
      width: 80,
    },
	  /*{
      "type": "input",
      "label": "Status",
      "prop": "result",
      "span": 12,
      search: true,
      width: 100,
      html:true,
      formatter:(val) => {
        if(val.result==='Pass'){
          return '<b style="color:green">'+val.result+'<b/>'
        }else {
          return '<b style="color:red">'+val.result+'<b/>'
        }
      }
    },*/
	  {
      "type": "input",
      "label": "测量任务",
      "prop": "type",
      "span": 12,
      hide: true,
      display: false
    },
	  /*{
      "type": "input",
      "label": "目录名",
      "prop": "pathName",
      "span": 12,
      hide: false
    },
	  {
      "type": "input",
      "label": "文件名",
      "prop": "fileName",
      "span": 12,
      hide: false
    },*/
    {
      label: '时间',
      prop: 'time',
      type: 'datetime',
      format: 'yyyy-MM-dd HH:mm:ss',
      valueFormat: 'yyyy-MM-dd HH:mm:ss',
      search: false,
      searchType:"datetimerange",
      startPlaceholder: '日期开始范围自定义',
      endPlaceholder: '日期结束范围自定义',
      width: 150,
    },
  ]
}

export const tableOption2 = {
  "border": true,
  "index": true,
  "indexLabel": "序号",
  "stripe": true,
  "menuAlign": "center",
  "align": "center",
  "searchMenuSpan": 24,
  addBtn: false,
  editBtn: false,
  delBtn: false,
  viewBtn:true,
  // menu: false,
  menuWidth: 80,
  search: {
    labelWidth: 120,  // 设置 search 部分的 label 宽度
  },
  "column": [
    {
      "type": "input",
      "label": "工单号",
      "prop": "fileName",
      "span": 12,
      search: true,
      html:true,
      formatter:(val) => {
        console.log(val.fileName);
        let split = val.fileName.split("_");
        return split[0];
      }
    },
    {
      type: "select",
      label: "车间",
      prop: "workshopId",
      span: 12,
      overHidden: true,
      dicUrl: "/admin-api/o3-pfoc/workshop/getWorkshopList",
      dicMethod: "get",
      props: {
        label: "workshopName",
        value: "id"
      },
      search: true,
      searchLabelWidth: 100
    },
    {
      type: "select",
      label: "产线",
      prop: "productLineId",
      span: 12,
      overHidden: true,
      dicUrl: "/admin-api/o3-pfoc/realityproductlinemain/getLineList",
      dicMethod: "get",
      props: {
        label: "realityLineName",
        value: "id"
      },
      search: true
    },
    {
      "type": "input",
      "label": "品号",
      "prop": "itemCode",
      "span": 12,
      search: true
    },
    {
      "type": "input",
      "label": "设备编号",
      "prop": "deviceSn",
      "span": 12
    },
    {
      "type": "input",
      "label": "描述",
      "prop": "description",
      "span": 12
    },
    {
      "type": "input",
      "label": "X轴曲率半径",
      "prop": "rocX",
      "span": 8
    },
    {
      "type": "input",
      "label": "Y轴曲率半径",
      "prop": "rocY",
      "span": 8
    },
    {
      "type": "input",
      "label": "X轴APC角度",
      "prop": "angleX",
      "span": 8
    },
    {
      "type": "input",
      "label": "Y轴APC角度",
      "prop": "angleY",
      "span": 8
    },
    {
      "type": "input",
      "label": "最大所有光纤高度差",
      "prop": "maxDhAll",
      "span": 8,
      hide: true,
    },
    {
      "type": "input",
      "label": "最大平均光纤高度差",
      "prop": "maxDhAve",
      "span": 8,
      hide: true,
    },
    {
      "type": "input",
      "label": "最大相邻光纤高度差",
      "prop": "maxDhAdj",
      "span": 8,
      hide: true,
    },
    {
      "type": "input",
      "label": "最大纤芯洼陷量",
      "prop": "maxcoredip",
      "span": 8,
      hide: true,
    },
    {
      "type": "input",
      "label": "X轴光纤倾斜",
      "prop": "fiberslopx",
      "span": 8,
      hide: true,
    },
    {
      "type": "input",
      "label": "Y轴光纤倾斜",
      "prop": "fiberslopy",
      "span": 8,
      hide: true,
    },
    {
      "type": "input",
      "label": "粗糙度Ra",
      "prop": "roughnessra",
      "span": 8,
      hide: true,
    },
    {
      "type": "input",
      "label": "粗糙度Rq",
      "prop": "roughnessrq",
      "span": 8,
      hide: true,
    },
    {
      "type": "input",
      "label": "负共面性",
      "prop": "coplanarity",
      "span": 8
    },
    {
      "type": "input",
      "label": "几何限制",
      "prop": "geoLimit",
      "span": 8
    },
    {
      "type": "input",
      "label": "数据填充",
      "prop": "datafill",
      "span": 8,
      hide: true,
    },
    {
      "type": "input",
      "label": "平面偏差",
      "prop": "flatDevi",
      "span": 8,
      hide: true,
    },
    {
      "type": "input",
      "label": "测量任务",
      "prop": "type",
      "span": 12,
    },
    {
      "type": "input",
      "label": "操作员",
      "prop": "operator",
      "span": 12,
    },
    {
      "type": "input",
      "label": "Status",
      "prop": "result",
      "span": 12,
      //search: true,
      width: 90,
      html:true,
      formatter:(val) => {
        if(val.result==='Pass'){
          return '<b style="color:green">'+val.result+'<b/>'
        }else {
          return '<b style="color:red">'+val.result+'<b/>'
        }
      }
    },
    {
      label: '时间',
      prop: 'sysTime',
      type: 'datetime',
      format: 'yyyy-MM-dd HH:mm:ss',
      valueFormat: 'yyyy-MM-dd HH:mm:ss',
      //search: true,
      searchType:"datetimerange",
      startPlaceholder: '日期开始范围自定义',
      endPlaceholder: '日期结束范围自定义',
      "span": 12,
    },
    {
      "type": "input",
      "label": "目录名",
      "prop": "pathName",
      "span": 12,
    },
    {
      "type": "input",
      "label": "文件名",
      "prop": "fileName",
      "span": 12,
    }
  ]
}
